Optimal. Leaf size=34 \[ \frac{(A-B) \sin (c+d x)}{d (a \cos (c+d x)+a)}+\frac{B x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0498775, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {2735, 2648} \[ \frac{(A-B) \sin (c+d x)}{d (a \cos (c+d x)+a)}+\frac{B x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2648
Rubi steps
\begin{align*} \int \frac{A+B \cos (c+d x)}{a+a \cos (c+d x)} \, dx &=\frac{B x}{a}-(-A+B) \int \frac{1}{a+a \cos (c+d x)} \, dx\\ &=\frac{B x}{a}+\frac{(A-B) \sin (c+d x)}{d (a+a \cos (c+d x))}\\ \end{align*}
Mathematica [B] time = 0.11739, size = 72, normalized size = 2.12 \[ \frac{\sec \left (\frac{c}{2}\right ) \cos \left (\frac{1}{2} (c+d x)\right ) \left (2 (A-B) \sin \left (\frac{d x}{2}\right )+B d x \cos \left (c+\frac{d x}{2}\right )+B d x \cos \left (\frac{d x}{2}\right )\right )}{a d (\cos (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.053, size = 56, normalized size = 1.7 \begin{align*}{\frac{A}{da}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }+2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) B}{da}}-{\frac{B}{da}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.50053, size = 99, normalized size = 2.91 \begin{align*} \frac{B{\left (\frac{2 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac{\sin \left (d x + c\right )}{a{\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac{A \sin \left (d x + c\right )}{a{\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.31193, size = 105, normalized size = 3.09 \begin{align*} \frac{B d x \cos \left (d x + c\right ) + B d x +{\left (A - B\right )} \sin \left (d x + c\right )}{a d \cos \left (d x + c\right ) + a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.10818, size = 49, normalized size = 1.44 \begin{align*} \begin{cases} \frac{A \tan{\left (\frac{c}{2} + \frac{d x}{2} \right )}}{a d} + \frac{B x}{a} - \frac{B \tan{\left (\frac{c}{2} + \frac{d x}{2} \right )}}{a d} & \text{for}\: d \neq 0 \\\frac{x \left (A + B \cos{\left (c \right )}\right )}{a \cos{\left (c \right )} + a} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16723, size = 58, normalized size = 1.71 \begin{align*} \frac{\frac{{\left (d x + c\right )} B}{a} + \frac{A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]